<%@ page language="java" pageEncoding="UTF-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%
    String path = request.getContextPath();
%>

<jsp:include page="/admin/inc/incHead.jsp" flush="false"/>
<script language="javascript">
    function userDel(userId) {
        if (confirm('您确定删除吗？')) {
            window.location.href = '<%=path %>/user/userDel.action?userId=' + userId;
        }
    }
</script>
<table width="100%" class="table table-bordered" style="background-color: #f4f4f4">
    <tr bgcolor="#E7E7E7">
        <td height="14" colspan="10" background="<%=path %>/img/tbg.gif">&nbsp;注册用户维护&nbsp;</td>
    </tr>
    <tr align="center" bgcolor="#FAFAF1" height="22">
        <td width="5%">ID</td>
        <td width="10%">用户名</td>
        <td width="10%">真实姓名</td>
        <td width="5%">性别</td>
        <td width="15%">联系方式</td>
        <td width="15%">E-mail</td>
        <td width="10%">QQ</td>
        <td width="10%">操作</td>
    </tr>
    <s:iterator value="#request.userList" var="user">
        <tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='red';"
            onMouseOut="javascript:this.bgColor='#FFFFFF';" height="22">
            <td bgcolor="#FFFFFF" align="center">
                <s:property value="#user.userId"/>
            </td>
            <td bgcolor="#FFFFFF" align="center">
                <s:property value="#user.userName"/>
            </td>
            <td bgcolor="#FFFFFF" align="center">
                <s:property value="#user.userRealName"/>
            </td>
            <td bgcolor="#FFFFFF" align="center">
                <s:if test="#user.userSex==0">男</s:if>
                <s:if test="#user.userSex==1">女</s:if>
                <s:if test="#user.userSex>1">其他</s:if>
            </td>
            <td bgcolor="#FFFFFF" align="center">
                <s:property value="#user.userTel"/>
            </td>
            <td bgcolor="#FFFFFF" align="center">
                <s:property value="#user.userEmail"/>
            </td>
            <td bgcolor="#FFFFFF" align="center">
                <s:property value="#user.userQq"/>
            </td>
            <td bgcolor="#FFFFFF" align="center">
                <a href="/user/userEditPage.action?userId=${user.userId}">修改</a>
                <a href="#" onclick="userDel(${user.userId})" class="pn-loperator">删除</a>
            </td>
        </tr>
    </s:iterator>
</table>
<jsp:include page="/common/page.jsp" flush="true"/>
<jsp:include page="/admin/inc/incFoot.jsp" flush="false"/>
